package ae.pcfc.etks.online.itworx.ehs.web.enums;

import java.util.HashMap;
import java.util.Map;

public enum AmendmentType {

	Licenses_Activity("Licenses Activity"),Facility_Expansion("Facility Expansion"),
	Facility_Modification("Facility Modification"),New_Addition("New Addition& Racking in the warehouse"),
	Additional_Machinery("Additional Machinery"),Additional_Chemicals("Additional Chemicals");

	private static Map<String, AmendmentType> propertyMap = new HashMap<String, AmendmentType>();

	static {
		propertyMap.put(Licenses_Activity.getPropertyName(), Licenses_Activity);
		propertyMap.put(Facility_Expansion.getPropertyName(), Facility_Expansion);
		propertyMap.put(Facility_Modification.getPropertyName(), Facility_Modification);
		propertyMap.put(New_Addition.getPropertyName(), New_Addition);
		propertyMap.put(Additional_Machinery.getPropertyName(), Additional_Machinery);
		propertyMap.put(Additional_Chemicals.getPropertyName(), Additional_Chemicals);
	}

	private String propertyName;

	AmendmentType(String propertyName) {
		this.propertyName = propertyName;
	}

	public String getPropertyName() {
		return propertyName;
	}

	public static AmendmentType getFromPropertyName(String propertyName) {
		if (propertyMap.containsKey(propertyName)) {
			return propertyMap.get(propertyName);
		} else {
			return null;
		}
	}

}
